<?php
include_once '../common_mbs.inc.php';
include_once '../smarty.inc.php';

//判断访问权限
$admin_index_module_obj = new osgh_admin_index_module_cls();
$is_warrant = $admin_index_module_obj->is_have_warrant($_ADMIN_ID,'user_list');
if(!$is_warrant) tcmc_cls::ShowMsg("没有权限访问！", "../index_body.html");

$act = trim($_INPUT['action']);
$user_obj = new user_cls();
$user_list = $user_obj->get_user_list(false, 'pid=0', '', '');
$smarty->assign('user_list' ,$user_list);

$company_obj = new company_cls();
$companylist = $company_obj->get_company_list(false, '', '', '');
$smarty->assign('company_list' ,$companylist);


if($act == 'edit')
{
	$user_id = $_INPUT['user_id'];	
	$user_arr = $user_obj->get_user_info($user_id);
	$smarty->assign('user_arr' ,$user_arr);
}
$smarty->display('user/save_user.tpl');
?>